<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Class: Service</title>

    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

    <h1 class="page-title">Class: Service</h1>

    



<section>

<header>
    <h2>
        <span class="ancestors"><a href="ProtoBuf.html">ProtoBuf</a><a href="ProtoBuf.Builder.html">.Builder</a>.</span>
    
    Service
    </h2>
    
        <div class="class-description"><p>Barebone of all runtime services.</p></div>
    
</header>

<article>
    <div class="container-overview">
    

    
        
<dt>
    <h4 class="name" id="Service"><span class="type-signature"></span>new Service<span class="signature">(rpcImpl<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>

    
</dt>
<dd>

    
    <div class="description">
        <p>Constructs a new runtime Service.</p>
    </div>
    

    

    

    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>rpcImpl</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>RPC implementation receiving the method name and the message</p></td>
        </tr>

    
    </tbody>
</table>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line3980">line 3980</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    

    

    

    
    <h5>Throws:</h5>
    
            

<dl>
    <dt>
        <div class="param-desc">
        If the service cannot be created
        </div>
    </dt>
    <dt>
        <dl>
            <dt>
                Type
            </dt>
            <dd>
                
<span class="param-type">Error</span>


            </dd>
        </dl>
    </dt>
</dl>


        

    

    
</dd>

    
    </div>

    

    

    

    

     

    

    
        <h3 class="subsection-title">Members</h3>

        <dl>
            
<dt>
    <h4 class="name" id="$options"><span class="type-signature">(static) </span>$options<span class="type-signature"> :Object.&lt;string, *></span></h4>

    
</dt>
<dd>
    
    <div class="description">
        <p>Service options.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">Object.&lt;string, *></span>


            </li>
        </ul>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line4083">line 4083</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    
</dd>

        
            
<dt>
    <h4 class="name" id="$type"><span class="type-signature">(static, non-null) </span>$type<span class="type-signature"> :<a href="ProtoBuf.Reflect.Service.html">ProtoBuf.Reflect.Service</a></span></h4>

    
</dt>
<dd>
    
    <div class="description">
        <p>Reflection type.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type"><a href="ProtoBuf.Reflect.Service.html">ProtoBuf.Reflect.Service</a></span>


            </li>
        </ul>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line4099">line 4099</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    
</dd>

        
            
<dt>
    <h4 class="name" id="$options"><span class="type-signature"></span>$options<span class="type-signature"> :Object.&lt;string, *></span></h4>

    
</dt>
<dd>
    
    <div class="description">
        <p>Service options.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">Object.&lt;string, *></span>


            </li>
        </ul>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line4091">line 4091</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    
</dd>

        
            
<dt>
    <h4 class="name" id="$type"><span class="type-signature">(non-null) </span>$type<span class="type-signature"> :<a href="ProtoBuf.Reflect.Service.html">ProtoBuf.Reflect.Service</a></span></h4>

    
</dt>
<dd>
    
    <div class="description">
        <p>Reflection type.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type"><a href="ProtoBuf.Reflect.Service.html">ProtoBuf.Reflect.Service</a></span>


            </li>
        </ul>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line4107">line 4107</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    
</dd>

        
            
<dt>
    <h4 class="name" id="rpcImpl"><span class="type-signature">(non-null) </span>rpcImpl<span class="type-signature"> :function</span></h4>

    
</dt>
<dd>
    
    <div class="description">
        <p>Service implementation.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">function</span>


            </li>
        </ul>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line3991">line 3991</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    
</dd>

        </dl>
    

    
        <h3 class="subsection-title">Methods</h3>

        <dl>
            
<dt>
    <h4 class="name" id="[Method]"><span class="type-signature">(abstract, static) </span>[Method]<span class="signature">(rpcImpl<span class="signature-attributes">non-null</span>, req, callback)</span><span class="type-signature"></span></h4>

    
</dt>
<dd>

    
    <div class="description">
        <p>Asynchronously performs an RPC call using the given RPC implementation.</p>
    </div>
    

    

    

    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>rpcImpl</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last"><p>RPC implementation</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>req</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a></span>


            
            </td>

            

            

            <td class="description last"><p>Request</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last"><p>Callback receiving
 the error if any and the response either as a pre-parsed message or as its raw bytes</p></td>
        </tr>

    
    </tbody>
</table>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line4011">line 4011</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<dt>
    <h4 class="name" id="[Method]"><span class="type-signature">(abstract) </span>[Method]<span class="signature">(req, callback)</span><span class="type-signature"></span></h4>

    
</dt>
<dd>

    
    <div class="description">
        <p>Asynchronously performs an RPC call using the instance's RPC implementation.</p>
    </div>
    

    

    

    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>req</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a></span>


            
            </td>

            

            

            <td class="description last"><p>Request</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last"><p>Callback receiving
 the error if any and the response either as a pre-parsed message or as its raw bytes</p></td>
        </tr>

    
    </tbody>
</table>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line4022">line 4022</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    

    

    

    

    

    
</dd>

        </dl>
    

    

    
</article>

</section>




</div>

<nav>
    <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="ProtoBuf.Builder.html">Builder</a></li><li><a href="ProtoBuf.Builder.Message.html">Message</a></li><li><a href="ProtoBuf.Builder.Service.html">Service</a></li><li><a href="ProtoBuf.DotProto.Parser.html">Parser</a></li><li><a href="ProtoBuf.DotProto.Tokenizer.html">Tokenizer</a></li><li><a href="ProtoBuf.Map.html">Map</a></li><li><a href="ProtoBuf.Reflect.Element.html">Element</a></li><li><a href="ProtoBuf.Reflect.Enum.html">Enum</a></li><li><a href="ProtoBuf.Reflect.Enum.Value.html">Value</a></li><li><a href="ProtoBuf.Reflect.Extension.html">Extension</a></li><li><a href="ProtoBuf.Reflect.Message.html">Message</a></li><li><a href="ProtoBuf.Reflect.Message.ExtensionField.html">ExtensionField</a></li><li><a href="ProtoBuf.Reflect.Message.Field.html">Field</a></li><li><a href="ProtoBuf.Reflect.Message.OneOf.html">OneOf</a></li><li><a href="ProtoBuf.Reflect.Namespace.html">Namespace</a></li><li><a href="ProtoBuf.Reflect.Service.html">Service</a></li><li><a href="ProtoBuf.Reflect.Service.Method.html">Method</a></li><li><a href="ProtoBuf.Reflect.Service.RPCMethod.html">RPCMethod</a></li><li><a href="ProtoBuf.Reflect.T.html">T</a></li></ul><h3>Namespaces</h3><ul><li><a href="ProtoBuf.html">ProtoBuf</a></li><li><a href="ProtoBuf.DotProto.html">DotProto</a></li><li><a href="ProtoBuf.Reflect.html">Reflect</a></li><li><a href="ProtoBuf.Util.html">Util</a></li></ul>
</nav>

<br clear="both">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a> on Wed Jan 06 2016 01:34:59 GMT+0100 (Mitteleuropäische Zeit)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>